﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Html5Music.Data;

namespace MusicForMvc3.Method.Data
{
    public class GetByLoginName : Cache.CacheBase<GetByLoginName, Html5Music.Model.User>
    {
        public GetByLoginName(UserListData userlist)
        {
            _userlist = userlist;
        }
        private UserListData _userlist = null;

        [Cache.CacheKey]
        public string Key { get; set; }

        public override Html5Music.Model.User GetObject()
        {
            return _userlist.GetByLoginName(Key);
        }
    }
}